<template>
  <div>
      添加成功 <br /><span>5 </span>秒后自动跳转...<br /><a href="/admin/addNews">点击我直接跳转</a>
  </div>
</template>

<script>
let timer = document.querySelector("span").innerText;
    //- console.log(timer);
    timer = parseInt(timer);
    setInterval(() => {
        timer--;
        document.querySelector("span").innerText = timer;
        if (timer < 1) {
            window.location.href = `/admin/addNews`;
        }
    }, 1000)
export default {

}
</script>

<style>

</style>